import QtQuick
import QtQuick.Controls

// 右上角设置参数图片按钮
Item {
    id: btn
    width: 70
    height: 70
    property string btnImagePressed:""
    property string btnImage:""

    property bool pressed: false
    signal clicked
    Image {
        anchors.fill: parent
        source: btn.pressed ? btnImagePressed : btnImage
        fillMode: Image.PreserveAspectFit
        smooth: true
    }
    MouseArea {
        anchors.fill: parent
        cursorShape: Qt.PointingHandCursor
        onPressed: btn.pressed = true
        onReleased: {
            btn.pressed = false
            btn.clicked()
        }
        onCanceled: settingBtn.pressed = false
    }
}
